package com.designtest;

/**
 * 合并页校验错误信息
 */
public class AppPublishMergeValidError {

    /**
     * 字段
     */
    private String field;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 是否为多语言
     */
    private boolean multiLanguage;

    /**
     * 当前语言
     */
    private String presentLanguage;

    public AppPublishMergeValidError() {

    }

    public AppPublishMergeValidError(String field, String msg, boolean isMultiLanguage, String presentLanguage) {
        this.field = field;
        this.msg = msg;
        this.presentLanguage = presentLanguage;
        this.multiLanguage = isMultiLanguage;
    }

    public static AppPublishMergeValidError newInstance(String field, String msg) {
        return new AppPublishMergeValidError(field, msg, false, null);
    }

    public static AppPublishMergeValidError newInstanceIsMultiLanguage(String field, String msg, String presentLanguage) {
        return new AppPublishMergeValidError(field, msg, true, presentLanguage);
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getPresentLanguage() {
        return presentLanguage;
    }

    public void setPresentLanguage(String presentLanguage) {
        this.presentLanguage = presentLanguage;
    }

    public boolean getIsMultiLanguage() {
        return multiLanguage;
    }

    public void setIsMultiLanguage(boolean isMultiLanguage) {
        this.multiLanguage = isMultiLanguage;
    }
}
